package edu.spec.sys.web;

import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.Map;

public class SessionContext {
	private static Map<String, HttpSession> sessionContext = new HashMap<String, HttpSession>();

	private SessionContext(){
	}

	public static void addSession(HttpSession session){
		sessionContext.put(session.getId(), session);
	}

	public static void removeSession(String sessionId){
		sessionContext.remove(sessionId);
	}

	public static HttpSession getSession(String sessionId){
		return sessionContext.get(sessionId);
	}
}
